package cn.elves.model.auth.config;

import cn.elves.model.auth.config.interceptor.AuthInterceptor;
import cn.elves.model.auth.service.AuthenticationService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.handler.MappedInterceptor;

@Configuration
public class MvcConfig {

    @Bean
    public MappedInterceptor authInterceptor(AuthenticationService authenticationService){
        return new MappedInterceptor(null,new AuthInterceptor(authenticationService));

    }
}
